/*
 * This file Copyright (c) 2015. Walle.
 * (http://www.wallellen.com). All rights reserved.
 *
 *
 * This file is dual-licensed under both the
 * Walle Agreement (WA) and the GNU General Public License.
 * You may elect to use one or the other of these licenses.
 *
 * This file is distributed in the hope that it will be
 * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT.
 * Redistribution, except as permitted by whichever of the GPL
 * or WA you select, is prohibited.
 *
 * 1. For the GPL license (GPL), you can redistribute and/or
 * modify this file under the terms of the GNU General
 * Public License, Version 3, as published by the Free Software
 * Foundation.  You should have received a copy of the GNU
 * General Public License, Version 3 along with this program;
 * if not, write to the Free Software Foundation, Inc., 51
 * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * 2. For the Walle Agreement (WA), this file
 * and the accompanying materials are made available under the
 * terms of the WA which accompanies this distribution, and
 * is available at http://www.wallellen.com/agreement.html
 *
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
 */

package com.wallellen.wechat.adapter;

import com.wallellen.wechat.WechatEventHandler;
import com.wallellen.wechat.WechatSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by <a href="mailto:wallellen@hotmail.com">WALLE</a> on 12/22/15.
 */
public abstract class WechatEventAdapter extends WechatSupport {
    private static final Logger logger = LoggerFactory.getLogger(WechatEventAdapter.class);
    private WechatEventHandler handler;

    /**
     * 构建微信处理
     *
     * @param request 微信服务发过来的http请求
     */
    protected WechatEventAdapter(HttpServletRequest request, WechatEventHandler handler) {
        super(request);

        this.handler = handler;
    }

    /**
     * 文本消息处理Msgtype=text
     */
    protected void onText() {
    }

    /**
     * 图像消息Msgtype=image
     */
    protected void onImage() {
    }

    /**
     * 语音消息 Msgtype=voice
     */
    protected void onVoice() {
    }

    /**
     * 视频 消息Msgtype=video
     */
    protected void onVideo() {
    }

    ;

    /**
     * 小视频 消息Msgtype=shortvideo
     */
    protected void onShortVideo() {
    }

    ;

    /**
     * 地理位置消息Msgtype=location
     */
    protected void onLocation() {
    }

    ;

    /**
     * 链接消息Msgtype=link
     */
    protected void onLink() {
    }

    ;

    /**
     * 未知消息类型的错误处理逻辑，不需要处理则空方法即可
     */
    protected void onUnknown() {
    }

    ;


    /**
     * click点击事件处理event=location
     */
    protected void click() {
    }

    ;

    /**
     * subscribe关注事件处理
     */
    protected void subscribe() {
    }

    ;

    /**
     * unSubscribe取消关注事件处理
     */
    protected void unSubscribe() {
    }

    ;

    /**
     * scan事件处理
     */
    protected void scan() {
    }

    ;

    /**
     * location事件处理event=location
     */
    protected void location() {
    }

    ;

    /**
     * view 事件处理event=location
     */
    protected void view() {
    }

    ;

    /**
     * 模板消息发送回调
     */
    protected void templateMsgCallback() {
    }

    ;

    /**
     * 扫码推事件
     */
    protected void scanCodePush() {
    }

    ;

    /**
     * 扫码推事件且弹出“消息接收中”提示框的事件
     */
    protected void scanCodeWaitMsg() {
    }

    ;

    /**
     * 弹出系统拍照发图的事件
     */
    protected void picSysPhoto() {
    }

    ;

    /**
     * 弹出拍照或者相册发图的事件
     */
    protected void picPhotoOrAlbum() {
    }

    ;

    /**
     * 扫码推事件且弹出“消息接收中”提示框的事件
     */
    protected void picWeixin() {
    }

    ;

    /**
     * 弹出地理位置选择器的事件
     */
    protected void locationSelect() {
    }

    ;

    /**
     * 客服人员有接入会话
     */
    protected void kfCreateSession() {
    }

    ;

    /**
     * 客服人员有关闭会话
     */
    protected void kfCloseSession() {
    }

    ;

    /**
     * 客服人员有转接会话
     */
    protected void kfSwitchSession() {
    }

    ;
}
